#include <bits/stdc++.h>
using namespace std;

const int MAXN = 1e5 + 10;
int cards[MAXN];
int cnts[MAXN];

inline int read()
{
	int x = 0,f = 1;
	char ch = getchar();

	while(ch < '0' || ch > '9')
	{
		if(ch == '-')
		{
			f = -1;
		}
		ch = getchar();
	}

	while(ch >= '0' && ch <= '9')
	{
		x = x * 10 + ch - '0';
		ch = getchar();
	}

	return x * f;
}

int main()
{
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);

	int n = 0;
	int maxr = -1,maxcnt = 0;
	int flg = 0,cnt = 0;
	int res = 0;
	n = read();
	res = n;

	for(int i = 0;i < n;i++)
    {
        cards[i] = read();
        cnts[cards[i]]++;
        maxr = max(maxr,cards[i]);
    }

    for(int i = 1;i <= maxr;i++)
    {
        if(!cnts[i])
        {
            continue;
        }

        if(flg == 0 && cnts[i])
        {
            flg = i;
            continue;
        }

        if(cnts[i] < cnts[flg])
        {
            res -= cnts[i];
            cnts[i] = cnts[flg];
        }
        else
        {
            res -= cnts[flg];
        }

        flg = i;
    }

    printf("%d",res);

	fclose(stdin);
	fclose(stdout);

	return 0;
}
